subroutine calcwmbej_io(iijka, iabij, &
          t1, t2, r1, r2, &
          icore, ig) 
use mod_ioff
use mod_iop 
implicit none
real*4, intent(inout) :: t1(*), t2(*), r1(*), r2(*) 
real*4, intent(inout) :: iijka(*), iabij(*)
real*4, intent(inout) :: icore(*), ig
!
!============================
call wmbej_t1bn_imnje_io(iijka,  &
                 t1, icore, 1.d0) 
call wmbej_iefmn_t1fj_t1bn_io(iabij,&
              t1, icore, -1.d0)
!============================
if(totgpu==0) then 
  call wmbej_iefmn_t2bfjn_io(iabij,&
              t2, icore, 0.5d0)
elseif(totgpu==1) then 
  call wmbej_iefmn_t2bfjn_2_io(iabij,&
              t2, icore, 0.5d0, ig)
endif
if(ldebug) then 
call printdnrm2('t2', t2, 3)
call printdnrm2('iabij', iabij, 3)
endif
!============================
if(totgpu==0) then 
call r2abij_t2aeim_wmbej_io(r2, t2, icore, 1.d0) 
elseif(totgpu==1) then
call r2abij_t2aeim_wmbej_2_io(r2, t2, icore, 1.d0, ig) 
endif 
!============================
!
return
end 
